/*
 * XML Type:  InvestmentStatementResponseMessageSetV1
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.InvestmentStatementResponseMessageSetV1
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML InvestmentStatementResponseMessageSetV1(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class InvestmentStatementResponseMessageSetV1Impl extends net.ofx.types.x2003.x04.impl.AbstractResponseMessageSetImpl implements net.ofx.types.x2003.x04.InvestmentStatementResponseMessageSetV1
{
    
    public InvestmentStatementResponseMessageSetV1Impl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName INVSTMTTRNRS$0 = 
        new javax.xml.namespace.QName("", "INVSTMTTRNRS");
    private static final javax.xml.namespace.QName INVMAILTRNRS$2 = 
        new javax.xml.namespace.QName("", "INVMAILTRNRS");
    private static final javax.xml.namespace.QName INVMAILSYNCRS$4 = 
        new javax.xml.namespace.QName("", "INVMAILSYNCRS");
    
    
    /**
     * Gets array of all "INVSTMTTRNRS" elements
     */
    public net.ofx.types.x2003.x04.InvestmentStatementTransactionResponse[] getINVSTMTTRNRSArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(INVSTMTTRNRS$0, targetList);
            net.ofx.types.x2003.x04.InvestmentStatementTransactionResponse[] result = new net.ofx.types.x2003.x04.InvestmentStatementTransactionResponse[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "INVSTMTTRNRS" element
     */
    public net.ofx.types.x2003.x04.InvestmentStatementTransactionResponse getINVSTMTTRNRSArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentStatementTransactionResponse target = null;
            target = (net.ofx.types.x2003.x04.InvestmentStatementTransactionResponse)get_store().find_element_user(INVSTMTTRNRS$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "INVSTMTTRNRS" element
     */
    public int sizeOfINVSTMTTRNRSArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(INVSTMTTRNRS$0);
        }
    }
    
    /**
     * Sets array of all "INVSTMTTRNRS" element
     */
    public void setINVSTMTTRNRSArray(net.ofx.types.x2003.x04.InvestmentStatementTransactionResponse[] invstmttrnrsArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(invstmttrnrsArray, INVSTMTTRNRS$0);
        }
    }
    
    /**
     * Sets ith "INVSTMTTRNRS" element
     */
    public void setINVSTMTTRNRSArray(int i, net.ofx.types.x2003.x04.InvestmentStatementTransactionResponse invstmttrnrs)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentStatementTransactionResponse target = null;
            target = (net.ofx.types.x2003.x04.InvestmentStatementTransactionResponse)get_store().find_element_user(INVSTMTTRNRS$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(invstmttrnrs);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "INVSTMTTRNRS" element
     */
    public net.ofx.types.x2003.x04.InvestmentStatementTransactionResponse insertNewINVSTMTTRNRS(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentStatementTransactionResponse target = null;
            target = (net.ofx.types.x2003.x04.InvestmentStatementTransactionResponse)get_store().insert_element_user(INVSTMTTRNRS$0, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "INVSTMTTRNRS" element
     */
    public net.ofx.types.x2003.x04.InvestmentStatementTransactionResponse addNewINVSTMTTRNRS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentStatementTransactionResponse target = null;
            target = (net.ofx.types.x2003.x04.InvestmentStatementTransactionResponse)get_store().add_element_user(INVSTMTTRNRS$0);
            return target;
        }
    }
    
    /**
     * Removes the ith "INVSTMTTRNRS" element
     */
    public void removeINVSTMTTRNRS(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(INVSTMTTRNRS$0, i);
        }
    }
    
    /**
     * Gets array of all "INVMAILTRNRS" elements
     */
    public net.ofx.types.x2003.x04.InvestmentMailTransactionResponse[] getINVMAILTRNRSArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(INVMAILTRNRS$2, targetList);
            net.ofx.types.x2003.x04.InvestmentMailTransactionResponse[] result = new net.ofx.types.x2003.x04.InvestmentMailTransactionResponse[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "INVMAILTRNRS" element
     */
    public net.ofx.types.x2003.x04.InvestmentMailTransactionResponse getINVMAILTRNRSArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentMailTransactionResponse target = null;
            target = (net.ofx.types.x2003.x04.InvestmentMailTransactionResponse)get_store().find_element_user(INVMAILTRNRS$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "INVMAILTRNRS" element
     */
    public int sizeOfINVMAILTRNRSArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(INVMAILTRNRS$2);
        }
    }
    
    /**
     * Sets array of all "INVMAILTRNRS" element
     */
    public void setINVMAILTRNRSArray(net.ofx.types.x2003.x04.InvestmentMailTransactionResponse[] invmailtrnrsArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(invmailtrnrsArray, INVMAILTRNRS$2);
        }
    }
    
    /**
     * Sets ith "INVMAILTRNRS" element
     */
    public void setINVMAILTRNRSArray(int i, net.ofx.types.x2003.x04.InvestmentMailTransactionResponse invmailtrnrs)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentMailTransactionResponse target = null;
            target = (net.ofx.types.x2003.x04.InvestmentMailTransactionResponse)get_store().find_element_user(INVMAILTRNRS$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(invmailtrnrs);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "INVMAILTRNRS" element
     */
    public net.ofx.types.x2003.x04.InvestmentMailTransactionResponse insertNewINVMAILTRNRS(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentMailTransactionResponse target = null;
            target = (net.ofx.types.x2003.x04.InvestmentMailTransactionResponse)get_store().insert_element_user(INVMAILTRNRS$2, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "INVMAILTRNRS" element
     */
    public net.ofx.types.x2003.x04.InvestmentMailTransactionResponse addNewINVMAILTRNRS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentMailTransactionResponse target = null;
            target = (net.ofx.types.x2003.x04.InvestmentMailTransactionResponse)get_store().add_element_user(INVMAILTRNRS$2);
            return target;
        }
    }
    
    /**
     * Removes the ith "INVMAILTRNRS" element
     */
    public void removeINVMAILTRNRS(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(INVMAILTRNRS$2, i);
        }
    }
    
    /**
     * Gets array of all "INVMAILSYNCRS" elements
     */
    public net.ofx.types.x2003.x04.InvestmentMailSyncResponse[] getINVMAILSYNCRSArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(INVMAILSYNCRS$4, targetList);
            net.ofx.types.x2003.x04.InvestmentMailSyncResponse[] result = new net.ofx.types.x2003.x04.InvestmentMailSyncResponse[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "INVMAILSYNCRS" element
     */
    public net.ofx.types.x2003.x04.InvestmentMailSyncResponse getINVMAILSYNCRSArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentMailSyncResponse target = null;
            target = (net.ofx.types.x2003.x04.InvestmentMailSyncResponse)get_store().find_element_user(INVMAILSYNCRS$4, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "INVMAILSYNCRS" element
     */
    public int sizeOfINVMAILSYNCRSArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(INVMAILSYNCRS$4);
        }
    }
    
    /**
     * Sets array of all "INVMAILSYNCRS" element
     */
    public void setINVMAILSYNCRSArray(net.ofx.types.x2003.x04.InvestmentMailSyncResponse[] invmailsyncrsArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(invmailsyncrsArray, INVMAILSYNCRS$4);
        }
    }
    
    /**
     * Sets ith "INVMAILSYNCRS" element
     */
    public void setINVMAILSYNCRSArray(int i, net.ofx.types.x2003.x04.InvestmentMailSyncResponse invmailsyncrs)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentMailSyncResponse target = null;
            target = (net.ofx.types.x2003.x04.InvestmentMailSyncResponse)get_store().find_element_user(INVMAILSYNCRS$4, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(invmailsyncrs);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "INVMAILSYNCRS" element
     */
    public net.ofx.types.x2003.x04.InvestmentMailSyncResponse insertNewINVMAILSYNCRS(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentMailSyncResponse target = null;
            target = (net.ofx.types.x2003.x04.InvestmentMailSyncResponse)get_store().insert_element_user(INVMAILSYNCRS$4, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "INVMAILSYNCRS" element
     */
    public net.ofx.types.x2003.x04.InvestmentMailSyncResponse addNewINVMAILSYNCRS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentMailSyncResponse target = null;
            target = (net.ofx.types.x2003.x04.InvestmentMailSyncResponse)get_store().add_element_user(INVMAILSYNCRS$4);
            return target;
        }
    }
    
    /**
     * Removes the ith "INVMAILSYNCRS" element
     */
    public void removeINVMAILSYNCRS(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(INVMAILSYNCRS$4, i);
        }
    }
}
